#!/usr/bin/env python
# coding: utf-8

# In[18]:


X = np.array([[1.2, 1.5, 1.8],
[1.3, 1.4, 1.9],
[1.1, 1.6, 1.7]])
y = np.array([5, 10, 9]).T 


# In[19]:


for element in y:
    X[:,element]*y[element]


# In[21]:


y(1)


# In[22]:


X.size


# In[23]:


X,index





SUM = 0
SUM_m =[]
for price in X:
    for i in range(0,3):
        SUM = price[i]*y[i]+ SUM
    SUM_m.append(SUM)
    SUM=0
    print(SUM_m)


# In[35]:


SUM_np = np.dot(X,y)
SUM_np


# In[36]:


get_ipython().run_line_magic('time', '')
SUM_np = np.dot(X,y)
SUM_np


# In[37]:


get_ipython().run_cell_magic('time', '', 'SUM_np = np.dot(X,y)\nSUM_np')


# In[38]:


get_ipython().run_line_magic('time', '')
SUM = 0
SUM_m =[]
for price in X:
    for i in range(0,3):
        SUM = price[i]*y[i]+ SUM
    SUM_m.append(SUM)
    SUM=0


# In[ ]:




